﻿namespace WebComponents.UI.Controls
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Web.UI.WebControls;

    public static class CustomImage
    {
        public static PlaceHolder CropImage(Image img)
        {

            PlaceHolder placeholder = new PlaceHolder();
            Table table = new Table 
            {
                BorderWidth =  1
            };
            TableRow tr = new TableRow();
            TableCell tc = new TableCell();
            tc.Controls.Add(img);
            tr.Cells.Add(tc);
            table.Rows.Add(tr);
            placeholder.Controls.Add(table);

            return placeholder;
        }

    }
}
